home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / security / doc / clippings / 920415-01 < prev    next >
Encoding:
Text File  |  1992-05-19  |  2.5 KB  |  60 lines

  1. Newsgroups: alt.security
  2. From: murphy@symcom.math.uiuc.edu (Michael L. Murphy)
  3. Subject: Re: rsh
  4. References: <15433@gandalf.UMCS.Maine.EDU>
  5. Message-ID: <1992Apr15.203649.3936@news.cso.uiuc.edu>
  6. Summary: use "xauth" to make X11 secure.
  7. Organization: Math Dept., University of Illinois at Urbana/Champaign
  8.  
  9. In article <15433@gandalf.UMCS.Maine.EDU> who@gandalf.UMCS.Maine.EDU writes:
  10. >
  11. >    People are able to rsh commands to other peoples consoles and
  12. >I was wondering how permissions could be set to prevent this. It can
  13. >get anoying when people rsh the screen melt to my console. We run SunOS
  14. >4.1 and use SUN 4/110 machines. Also, someone got hold of xlock.c and
  15. >has modified it as a nasty trojan horse by using rsh to lock people's
  16. >screens. The modifications were simple, but with a little effort could
  17. >be made far more evil. So, for your safety and mine, please prevent
  18. >rsh to other people's sessions.
  19. >
  20.  
  21. Your letter is a little confusing, but it sounds like you are running
  22. Xwindows.  It also sounds like you are not using the .Xauthority file.
  23. First of all, create a file .xsession in the user's home directory
  24. that says:
  25.  
  26. exec X -auth $HOME/.Xauthority
  27.  
  28. Now, use the "xauth" command to add entries for any hosts you might use:
  29.  
  30. example% xauth
  31. xauth: Creating new file ~/.Xauthority......
  32. xauth> add host1:0 . 5c701355
  33. xauth> add host1/unix:0 . 5c701355
  34. xauth> add host2:0 . 5c701355
  35. xauth> add host2/unix:0 . 5c701355
  36. etc......
  37. xauth> quit
  38.  
  39. (It doesn't matter what hexadecimal number you use, as long as it has an
  40. even number of digits.)  "." is an abbreviation for MIT-MAGIC-COOKIE-1
  41. protocol, which is not completely secure, but will certainly ward off
  42. ameteur attempts to connect unauthorized clients to an Xserver.
  43.  
  44. You will notice that after you run xauth, a file ".Xauthority" will be
  45. created in your home directory.  It will also only be user-readable.
  46. (If the file could be read, it could be copied and used by any other
  47. user on your system.)
  48.  
  49. Now, the Xserver when starting up will read this file and only accept
  50. clients who use that certain hexadecimal "cookie" specified in your
  51. .Xauthority file.  Also, all clients will read that file and use
  52. that cookie to connect to your server.  See the man pages of "X" and
  53. "xauth" for more information.
  54. -- 
  55. +=And=the=Master=said=unto=the=silence,="In=the=path=of=our=happiness=shall=+
  56. \ we find the learning for which we have chosen this lifetime." - R. Bach   /
  57. / Michael Murphy, senior (Math/C.S.), U of Ill.  |   Address: URH 10 Carr   \
  58. +=send=e-mail=to=<murphy@symcom.math.uiuc.edu>==/^\==Urbana,=IL=61801=======+
  59.  
  60.